how to group by mean in r

join shbcf.ru